package com.naiterui.ehp.bs.weixin.subscribe;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 服务评价通知
 *
 * @author yangfuya
 * @version 1.0
 * @date 2021/5/26 17:33
 **/
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
public class ServiceEvaluationSubscribe extends BaseSubscribe {

    private static final long serialVersionUID = -3868134674590587209L;

    /**
     * 服务项目
     */
    private String serviceItem;

    /**
     * 完成时间
     */
    private String completeTime;

    /**
     * 温馨提示
     */
    private String tips;

    @Override
    public String getTemplateLabel() {
        return "SERVICE_EVALUATION";
    }

    @Override
    public void handleContent(List<SubscribeProperties.Content> contentList) {
        Map<String, String> formatMap = new HashMap<>(6);
        formatMap.put("SERVICE_ITEM", getServiceItem());
        formatMap.put("COMPLETE_TIME", getCompleteTime());
        formatMap.put("TIPS", getTips());
        super.formatData(contentList, formatMap);
    }
}
